home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
MSDOS
/
(m)aak
/
DRAW!.DOC
< prev
next >
Wrap
Text File
|
1987-06-13
|
28KB
|
542 lines
D R A W !
Second Release
ver 1.75
User Guide and Reference
June 11, 1987
Welcome to DRAW!, an easy to use art program for the IBM
PC/XT/AT and 100% compatible machines.
N.B.: You are welcome to edit or customize this program to your
own wishes. However, you MUST pass it on in its original form.
So, keep a backup of the original in a safe place.
LEGAL STUFF, ETC.
This program is presented to you under the USER-SUPPORTED software
concept. This means that you, the user are expected to SUPPORT
this fine product and others like it, no matter where you got it.
One thing to remember is: DRAW! IS NOT YOUR PROPERTY! Do not
confuse "User-Supported" with "Public Domain." You are encouraged
to use the program and PLEASE copy it, give to your friends,
upload it to BBS's, whatever.
However, if you really like the program, and plan to use it
regularly, it is asked that you send in a check or money order for
however much you think the program is worth. I have seen many very
good User-Supported programs priced at $50 to $100 for
registration. Most people really won't bother to pay this much; so
the suggested registration fee for DRAW! is only $20. I feel that
this will allow practically anyone who values the program to be
made an "official" user of it, with full support of the product.
I feel that this is a much better way of spreading programs than
either placing them entirely in the public domain, or marketing
them at exorbitant prices that make good programs out of the reach
of the average user. This is because with User-Supported software,
you have the option of rejecting the program if you don't feel
that it meets your needs, rather than blowing your money away on
something you don't really need. Second, IF YOU REGISTER, you can
have full support and updating of the product.
So, to register, send $20 to:
Greg Ward
924 43rd Street
West Des Moines, IA 50265
Please enclose your name, address and any comments you may have.
If you have discovered a bug that I haven't (and maybe a good way
to fix it), I would like to know, so that everyone else who uses
the program can take advantage of the improvement.
To be sent a copy of the latest version of the program, make that
$25, along with a stamped, self-addressed envelope AND an MS-DOS
formatted disk.
Also, if you have made any changes in the source code and perhaps
recompiled it, I would like to know about them so that they can
perhaps be put in future versions of DRAW!
Further stuff: if you do feel that DRAW! needs a few minor
changes, you are welcome to do so on a couple of conditions: 1)
that YOU retain a copy of the original file DRAW!.ARC that is
EXACTLY the way you got it in the first place; 2) that if you pass
the program on, you pass it on EXACTLY as you got it. This should
be as the file DRAW!175.ARC, containing the files:
ASPECT PIC 16392 1-28-87 8:06p
CIRCLE PIC 16392 5-14-87 8:47p
DRAW! BAS 19035 6-12-87 11:18p
DRAW! DOC 24162 6-12-87 11:51p
DRAW! EXE 61368 6-12-87 11:19p
HELP SCR 4007 6-12-87 10:00p
QUIKSTRT DOC 3900 6-12-87 11:48p
READ ME 1814 6-12-87 11:49p
(yes, that IS a DOS directory listing -- just to make sure you get
it right!)
No warranty, express or implied, exists as to the suitability of
DRAW! for any particular purpose. Also, I will make no guarantee
or warranty that while you're using DRAW! a hole won't open in the
floor beneath your computer and suck it into the bowels of the
Earth. This probably won't happen, but if this -- or anything else
bad, like loss of data or damage to your hardware -- does, this is
a disclaimer saying: NOT MY FAULT! My sincerest apologies if it
DOES happen, but I will not be held responsible for your choice to
use the program.
STARTING DRAW!
At the beginning of a session, the program will ask for a "file-
name." This means that it wants to know what you wish to name your
drawing when it gets saved to disk.
You must specify a filename, because if you don't, you might
accidentally save the drawing, and giving it a null filename would
result in a "Bad file name" error message from BASIC, your
expulsion from the program and loss of the drawing. Luckily, the
program will not permit this regrettable circumstance.
If the file with the extension .PIC and the name you typed in
already exists, DRAW! will load it into memory (at location B800h,
if interested; this is where screen memory starts) and you will
see the picture on your screen, in 640 x 200 graphics mode.
If there is no file similar to the one you named in the current
directory, DRAW! will look there anyway. Upon not finding it,
DRAW! will ignore this minor detail and you will be displayed one
of the strangest things about the program: a totally blank screen.
(More on what to do here comes later.)
You will notice that at the beginning of the program, it is
stressed that CapsLock and NumLock MUST be turned off. This is
because DRAW! makes use of "key trapping," which is a feature of
BASIC whereby keys that would not ordinarily be returned by BASIC
functions -- such as [Ctrl][Up] or [Ctrl][Break] -- are returned
and acted upon. However, neither of these "locks" may be active if
this is to work, because different scan codes are returned if they
ARE active.
THE POINTER
The pointer is, basically, a small cross that moves around the
screen at your will (keypress, actually). It is used to indicate a
specific pixel, for use in various commands. I will explain it
here in terms of the [F6] Goto Pixel command. When you first hit
[F6], the screen will momentarily blank out, a cross will appear,
and your picture will be back -- with a cross in the middle of it.
(After the first use, it remembers its old spot and returns
there.) Your job is to move the pointer around the screen to the
spot where you want to be. If NumLock is on, then the pointer will
move in jumps of 10 pixels for vertical movement or 20 pixels for
horizontal movement If you wish to abort the operation, just hit
[Esc], and you will return. When you are done, however, hit
[Enter], and you may draw starting at your current point. See the
specific command for more information regarding how the pointer
and the command work together.
Note: When you leave the pointer's startup location the picture
will be marred in that spot. Don't worry about this, as it will
come back when you are done pointing.
DRAW!'s COMMANDS
Drawing
Commands
Basic Movement Arrow Keys
Use the arrow keys (numeric key pad) to move your lines around.
DRAW! starts out in the upper left hand corner of the screen
(coordinates 0,0) in high-resolution (640 x 200, 2 colours at a
time) graphics mode. In order to move your "cursor" (for lack of
a better word) around the screen, simply press one of the nine
direction keys that are on the numeric keypad. Pressing [Ctrl][5]
on the keypad will take you to the center of the screen. Other
methods of getting around the screen quickly are: (a) press [F6],
and you will be shown "The Pointer" (see page 11), or (b) use the
[Ctrl][Arrow] keys. More on this in the next command.
50-Pixel Jumps Ctrl-Arrows
Hit [Ctrl][LeftArrow] to move 50 pixels to the left, and
[Ctrl][RightArrow] to go right 50 pixels. Also, you can hit
[Ctrl][DownArrow] to move 50 pixels down, and [Ctrl][UpArrow] to
go up 50 pixels. Note that every horizontal pixel is about
one-half the distance of every vertical pixel. Be sure to
compensate for this in your drawing.
Changing Colours [F1] & [F2]
Press [F1] to make the line invisible; this will give off a low
tone. Press [F2] to make it visible; this will give off a
high-pitched tone. The uses of this feature are manifold. When I
first set out to write this program, I was severely curtailed by
not being able to either move without leaving a "trail", or
erasing mistakes (yes, everyone will make them). So, I decided to
implement this feature. Remember, if you find yourself lost on
the screen, one of two things could be happening. Either you are
invisible, or you have drawn off the screen. The first is the
easiest to remedy as well as the one that makes the user feel most
stupid. Simply press F2, and draw. If you see nothing even after
trying this, use F6 or [Ctrl][5] to specify a point that is on
screen and start from there.
Entering Text [F5]
Press [F5] to clear the box in the middle of the screen and be
prompted for a point at which to enter text in your drawing.
Then, after you have returned to your drawing, press any normal
text key (or Ctrl+letter key for characters such as arrows, happy
faces, etc.) to print text at that specified point on the screen.
This is very useful if you want to include legends, titles,
pointers, or any other facet of a drawing that would need actual
printed text.
Starfield [Alt][T]
Press [Alt][T] to choose various things having to do with putting
randomly placed dots on the screen. There are three options: X
limit, Y limit, and number of dots. The X limit is simply the
limit to constrain how far to the right the stars can go. By
choosing the default of 639, dots will be placed all across the
screen. If, for example, you choose 320, then dots will only be
placed on the LEFT half of the screen. Note: if you choose a
negative number for this (or the y limit), then the stars will be
placed to the RIGHT rather than the left of this position. So, if
you said -320 to this prompt, then you would get dots only on the
RIGHT half of the screen.
The details of this are very much the same for Y limit; but a
positive number means dots ABOVE that position, and a negative
number puts them BELOW it. You probably don't understand this
right now, but as soon as you start to try it, it should be a lot
clearer.
This is a nice feature if you make a lot of -- or even one or two
-- pictures that require "starfield" backgrounds, especially over
only a certain area of the screen. However, please don't ignore
this feature just because it's hard for me to write about it. It
was even harder to devise a working algorithm for the negative
bits, so don't let my work go to waste!
Paint [Alt][P]
Press [Alt][P] to paint an area of the screen. You will be shown
the pointer (see page 11); simply move it to anywhere in the area
to be painted, and press [Enter]. Then, you will be presented
with a menu having two options -- "gray shade #2" and "solid
fill." Solid fill is simply turning every pixel in the area on,
while gray shade 2 is a nice shade of gray. I'm still working on
getting other gray shades in.
Make sure that the area to be painted is "pixel-tight" -- i.e.,
that the paint won't leak out of the boundaries of the shape. It
might be a good idea to save the drawing before attempting to
paint any questionable area (many-sided shapes can be deceiving),
and then load the picture again with [F3] if the fill leaks.
Circles [Alt][C]
Press [Alt][C] to draw a circle or change the current parameters
of circle drawing. The default values for circle-drawing will draw
a circle with a 100-pixel radius (on the horizontal axis) in the
center of the screen. The options are: location of center point,
radius, how much of the circle/ellipse is drawn, and the aspect
ratio. To change any of these, hit [Alt][C], and then [S] for
Setup Parameters (as shown in the box). Also, you can hit [P] to
use the pointer (see page 11) for location of the center, and then
go to the prompts below. A list of possibilities will be shown,
like this: (current values in brackets)
X coordinate [320]
Y coordinate [100]
Radius [100]
(after answering these, the box will clear and you will see the
following)
Arc from [ 0]
Arc to [ 360]
Aspect ratio [.4166667]
Then, a question mark will appear after the X coordinate prompt.
Type in a number from 1 to 639 (see Appendix A, "The High-
Resolution Graphics Screen," for more information). The reason
that 1 is the lowest is that if the number 0 is entered, the value
stays the same. Because of this, you can just hit [Enter] to any
prompt whose value you wish unchanged. For "Y coordinate," enter
any number from 1 to 199. For "Radius," any number from 1 to about
350 will produce a visible circle. Incidentally, the radius you
specify is the radius in horizontal pixels, rather than vertical
pixels. This is more important in regard to aspect ratios, which
come a little later.
"Arc from" and "Arc to", as the names would imply, are closely
related. BASIC measures segments of a circle in radians, rather
than the more common degrees. However, I have made it so that
DRAW! will accept degrees, and later I'll have regular radians for
all you trigonometry whizzes out there. I will now implore you to
pretend that the following diagram is really a circle...
.5
-|-
/ \
/ \
| |
1 - - 0 or 2
| |
\ /
\ /
-|-
1.5
What all this really means is that every spot on the circle can be
represented by a number from 0 to 2, times pi (3.14159). To
express this in degrees, 0pi rad would be 0 degrees, .5pi rad
would be 90 degrees, 1pi rad would be 180 degrees, and 1.5pi rad
would be 270 degrees.
So, if you want to draw a semicircle of the left half of the
circle, "Arc from" would be 90, and "Arc to" would be 270. One
more helpful thing about drawing arcs -- if you make the to or
from number negative, it will draw a radius of the circle! If you
still don't understand, it might be to your advantage to look in
your BASIC manual and/or try some experimentation in DRAW!. For
more information on this, load the file CIRCLE.PIC into DRAW! and
look it over. It's much easier for me to make a circle in graphics
than text.
The next part is "Aspect ratio." This allows you to draw ellipses
other than circles. The default aspect ratio in high-res mode is
5/12 (approximately equal to .41666667, which is what you see at
the prompt) -- i.e., for every 5 vertical pixels in the radius, 12
are drawn horizontally. When the aspect ratio is less than one,
the ellipse is "horizontal," and for every x radius pixels
horizontally in the aspect ratio x/y, the vertical radius will be
y pixels. The reverse is true when the aspect ratio is greater
than one. Probably the only thing that will get you completely
familiar with aspect ratios is good ol' trial and error. Another
aid is the picture ASPECT.PIC, which is included with the program
and can be loaded, viewed and printed if you wish.
Boxes [Alt][B]
Hit [Alt][B] to access the Boxes command. This command can be used
to draw any size box, anywhere on the screen. Upon hitting
[Alt][B], you will be shown a menu with three options -- "Use
Pointer to specify coordinates of box," "Draw screen border," and
"Specify coordinates of box."
If you select [P] for Pointer, you will of course be shown the
pointer. Use it to indicate the upper left-hand corner of the box.
When this is done, you will again be shown the pointer. This time,
the program wants the lower right-hand corner. When you are done
with that, your box will be drawn in the indicated location.
If you choose [B] for border, DRAW! will simply draw a box from
(0,0) to (639,199) -- a very nice looking border for your screen.
Finally, if you select [C] for coordinates, you will be asked the
Upper-left X and Y coordinates, and the Lower-right X and Y
coordinates. DRAW! will then make a box at the coordinates you
entered.
Lines [Alt][L]
Press [Alt][L] to draw a line from one specific point on the
screen to another. The difference between this and simply moving
around the screen with the arrow keys is that the arrow keys only
go vertically, horizontally, or one specific angle diagonally.
The first thing that happens upon going to the Lines command is
the appearance of the pointer. This time, it wants the starting
point of the line. Just move the pointer there, and hit [Enter].
Then the screen will clear and the drawing will suddenly reappear.
Now, use the arrow keys to move to the other end of the line. When
it looks good, hit [Enter]. If NumLock is on while doing Lines,
the line will move in jumps of 10 or 20 pixels. This depends on
whether or not you are going vertically or horizontally; I made
them different amounts so as to make them seem roughly the same,
due to the unequal proportion (5 to 12) of vertical to horizontal
pixels in the 640 x 200 graphics screen.
If you wish to abort this operation at any time, simply hit [Esc]
and you will be returned to your drawing the way it was before you
started Lines. Also, one handy part of this command is that you
can hit [F1] or [F2] while placing the line to change its colour.
colour. This works exactly the same way as it does during the
main part of the program.
Note: While you are placing the end point of the line, you may
wipe out considerable amounts of your drawing. Don't be worried
about this; as you'll get it all back when you hit either [Esc] to
abort or [Enter] to confirm. However, be sure not to lose areas
that you have to see in order to complete the line!
I/O Commands
Saving [F4]
Press [F4] to save your drawing with the filename already given,
and to name the old one as filename.BAK. If you don't have an old
one, don't worry; DRAW! ignores this fact. This takes up just over
16k, so be sure you have room on your disk to store it.
Loading [F3]
Press [F3] to load the specified file. This is basically so that
if you make a big mistake, you can go back to wherever you were
when your drawing was last saved. This happens quite frequently,
or at least until you are adequately familiar with the program.
Printing [Shift][PrtSc]
Press [Shift][PrtSc] to print your drawing. The drawing will take
up a full sheet of 8-1/2 x 11 paper, so again make sure you have
room on the applicable medium. Don't be surprised when it starts
printing sideways -- the GRAPHICS.COM program on your DOS disk
(load this before starting DRAW! if you want to print your
picture) does this on purpose, and it really ends up looking
rather nice. One strange thing about this is that the very bottom
edge of the paper (right side of the screen) occasionally does not
print. In order to avoid this, a good idea is to disenable
perforation skip or paper-error detection on your printer.
Miscellaneous
Commands
New Picture [Del]
Press [Del] to clear the screen, start over, and specify a new
filespec. If you have made any changes, the program will first
ask "Are you sure? (Y/N)". Simply hit "Y" (or "y") for Yes, and
"N" (or "n") for No. If you specify No, the program will return
you to your drawing.
Return to DOS [Alt][Q]
To return to the operating system, simply hit [Alt][Q]. Whether or
not your picture has been changed, the program will beep twice and
prompt you with "Are you sure? (Y or N)". If you have changed the
picture since last loading or saving it, you will receive a
message saying "WORK HAS NOT BEEN SAVED!!!!" Hit "y" to return to
DOS, and "n" to return to your picture.
Status [Alt][S]
In order to see some salient points about your picture and
environment, hit [Alt][S]. Around the middle of the screen, a box
will form, inside of which will be displayed:
Printing on line xx and column xx
Filespec for this drawing is xxxxxxxx.PIC
The time is xx:xx:xx
Press any key to return.
Grid [Alt][G]
Press [Alt][G] to be shown a grid on top of the screen. This is
useful if you wish to know the approximate coordinates of a point.
APPENDIX A
THE HIGH-RES GRAPHICS SCREEN
X-AXIS
0 50 100 150 200 250 300 350 400 450 500 550 600 639
0 /----|----|----|----|----|----|----|----|----|----|----|----|---\ 0
| |
| |
| |
50 - - 50
| |
Y | |
| | |
A | |
X 100 - - 100
I | |
S | |
| |
| |
150 - - 150
| |
| |
| |
| |
199 \----|----|----|----|----|----|----|----|----|----|----|----|---/ 199
0 50 100 150 200 250 300 350 400 450 500 550 600 639
The high resolution graphics screen, as shown above, is 640 x 200
pixels. Please note, however, that this does not apply for the F5
/ Goto Character command. Here, you will be asked the line and
column. Line is from one to twenty-five, and column is from one to
eighty.